<template>
	<view v-if="pageShow" class="mainpadding2">
		<view class="mainpadding_top ffffff radius">
			<view class="flexbetween">
				<!-- 状态:0=待参保,4已申报,1=在保,3=待退保,2=停保,， -->
				<view class="xiaohei titletext">参保人：{{dataAll.name}}</view>
				<view class="lable" v-if="dataAll.status==2 && dataAll.is_today==1">今日停保</view>
				<view class="lable" v-if="dataAll.status==0">待参保</view>
				<view class="lable" v-if="dataAll.status==4">已申报</view>
				<view class="lable" v-if="dataAll.status==5">工伤</view>
				<view class="lable" v-if="dataAll.status==6">已理赔</view>
				<view class="lable" v-if="dataAll.status==2 && dataAll.is_today!=1">已停保</view>
				<view class="lable" v-if="dataAll.status==1 && dataAll.is_today==1"
					style="background-color: #c1282e;color: #fff;">明日生效</view>
					<view class="lable" v-if="dataAll.status==1 && dataAll.is_today!=1">在保</view>
				<view class="lable" v-if="dataAll.status==3">待退保</view>
			</view>
			<view class="xiaohei margin_top2 titletext" v-if="dataAll.user_gb_xz_id==5">性别：{{dataAll.sex==1?"男":"女"}}
			</view>
			<view class="xiaohei margin_top2 titletext" v-if="dataAll.user_gb_xz_id==5">手机号：{{dataAll.tel}}</view>
			<view class="xiaohei margin_top2 titletext">身份证号：{{dataAll.idcard}}</view>
			<view class="xiaohei margin_top2 titletext" v-if="dataAll.user_gb_xz_id==5">身份证居住地：{{dataAll.address}}</view>
			<view class="xiaohei margin_top2 titletext" v-if="dataAll.user_gb_xz_id==5">岗位：{{dataAll.gangwei.name}}</view>
			<view class="xiaohei margin_top2 titletext" v-if="dataAll.user_gb_xz_id==5">合同公司：{{dataAll.htcompany.name}}
			</view>
			<view class="xiaohei margin_top2 titletext">公司：{{dataAll.company.name}}</view>
			<view class="xiaohei margin_top2 titletext" v-if="dataAll.user_gb_xz_id!=5">险种：{{dataAll.xz_name}}</view>
			<view class="xiaohong margin_top2 titletext" v-if="dataAll.user_gb_xz_id==5">险种：{{dataAll.xz_name}}</view>
			<view class="xiaohei margin_top2 titletext">购买时间：{{dataAll.buytime_text}}</view>
			<!-- 状态:0=待参保,1=在保,2=停保,3=待退保 -->
			<view class="flexright margin_top">
				<view class="submitbtn margin_left2" v-if="dataAll.status==2" style="width: 150rpx;"
					@click="xubaostart(dataAll.id)">续保</view>
				<view class="submitbtn margin_left2"
					v-if="dataAll.status==1 && dataAll.user_gb_xz_id!=5 && dataAll.status!=4"
					style="width: 150rpx;background-color: #f8f8f8;color: #c1282e;" @click="tingbaostart(dataAll.id)">
					停保</view>
				<view class="submitbtn margin_left2" v-if="dataAll.status==0 || dataAll.status==2"
					style="width: 150rpx;background-color: #f8f8f8;color: #c1282e;" @click="trashfnstart(dataAll.id)">
					删除</view>
				<view class="submitbtn margin_left2"
					v-if="dataAll.status==1 && dataAll.user_gb_xz_id==5 && dataAll.is_today!=1 && dataAll.is_self==1"
					style="width: 150rpx;background-color: #f8f8f8;color: #c1282e;" @click="tuibaostart(dataAll.id)">退保
				</view>
			</view>
			<view class="flexright">
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid:"",
				dataAll:{},
				pageShow:false
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.getDetail()
		},
		methods: {
			getDetail(){
				httpRequest.request('/api/user/userGbDetail', 'GET', {
					id:this.listid
				}).then(res => {
					this.dataAll = res.data
					this.pageShow = true
				})
			}
		}
	}
</script>
<style lang="scss" scoped>

</style>
